{template 'member', 'header'}
<div id="memberArea">
	{template 'member', 'account_manage_left'}
	<div class="col-auto">
		<div class="col-1" style="margin-bottom:20px;">
			<h5 class="title">{L('account_bind_list')}</h5>
			<table width="100%" cellspacing="0"  class="table-list">
				<thead>
				<tr>
					<th>{L('bind_account')}</th>
					<th>{L('bind_student_id')}</th>
					<th>{L('bind_time')}</th>
					<th>{L('bind_status')}</th>
					<th>{L('bind_op')}</th>
				</tr>
				</thead>
				<tbody>
				{loop $bind_list $bk $bv}
				<tr>
				<td>{$bv['username']}</td>
				<td>{$bv['student_no']}</td>
				<td>{$bv['format_bind_time']}</td>
				<td>{$bv['bind_status_text']}</td>
				<td>
					{if in_array($bv['status'], array('0', '1'))}
					{if ($this->memberinfo['modelid']==10 && $bv['status']==0) || ($this->memberinfo['modelid']==12 && $bv['status']==1)}
					<a href="javascript:;" onclick="if(confirm('{L('bind_you_sure').L('bind_agree').L('bind_request_msg')}?')) location.href='index.php?m=member&c=index&a=account_bind&t=bind_agree&bid={$bv['id']}';">{L('bind_agree')}</a> | 
					<a href="javascript:;" onclick="if(confirm('{L('bind_you_sure').L('bind_reject').L('bind_request_msg')}?')) location.href='index.php?m=member&c=index&a=account_bind&t=bind_reject&bid={$bv['id']}';">{L('bind_reject')}</a>
					{else}
					{L('wait_sure')}
					{/if}
					{elseif in_array($bv['status'], array('2', '3'))}
					{if ($this->memberinfo['modelid']==10 && $bv['status']==2) || ($this->memberinfo['modelid']==12 && $bv['status']==3)}
					<a href="javascript:;" onclick="if(confirm('{L('bind_you_sure').L('bind_agree').L('unbind_request_msg')}?')) location.href='index.php?m=member&c=index&a=account_bind&t=unbind_agree&bid={$bv['id']}';">{L('bind_agree')}</a> | 
					<a href="javascript:;" onclick="if(confirm('{L('bind_you_sure').L('bind_reject').L('unbind_request_msg')}?')) location.href='index.php?m=member&c=index&a=account_bind&t=unbind_reject&bid={$bv['id']}';">{L('bind_reject')}</a>
					{else}
					{L('wait_sure')}
					{/if}
					{else}
					<a href="javascript:;" onclick="if(confirm('{L('bind_you_sure').L('unbind_apply')}?')) location.href='index.php?m=member&c=index&a=account_bind&t=unbind&bid={$bv['id']}';">{L('unbind_apply')}</a>
					{/if}
				</td>
				</tr>
				{/loop}
				</tbody>
			</table>
		</div>
		<div class="col-1 ">
			<h5 class="title">{L('account_bind')}</h5>           
			<div class="content">			
			<form method="post" action="index.php?m=member&c=index&a=account_bind&t=bind" id="myform" name="myform">
				<table width="100%" cellspacing="0" class="table_form">
					<tr>
						<th width="100">{L('bind_accounts')}</th> 
						<td><input name="bind_name" value="" type="text" class="input-text" size="30"></td>
					</tr>
					{if $member_modelid==12}
					<tr>
						<th width="100">{L('bind_student_ids')}</th> 
						<td><input name="bind_stno" value="" type="text" class="input-text" size="30"></td>
					</tr>
					{/if}
					<tr>
						<th></th>
						<td><input name="dosubmit" type="submit" id="dosubmit" value="{L('submit')}" class="button"></td>
					</tr>
				</table>
			</form>
			</div>
			<span class="o1"></span><span class="o2"></span>
			<span class="o3"></span><span class="o4"></span>
		</div>
	</div>
</div>
<div class="clear"></div>
{template 'member', 'footer'}